package com.jiegui.payinterface.context;

import com.jiegui.payinterface.handler.PaymentHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * 支付接口-付款配置
 *
 * @author wuqicheng
 * @date 2021/3/10
 */
@Configuration
public class TradeConfig {

    @Resource
    private PaymentHandler wxpayHandler;

    @Resource
    private PaymentHandler wxPayThaHandler;



    @Bean
    public Map<String, PaymentHandler> paymentHandlers() {
        Map<String, PaymentHandler> paymentHandlers = new HashMap<>();
        paymentHandlers.put("WXPAY-TH", wxPayThaHandler);
        paymentHandlers.put("WXPAY-PAYMENT", wxpayHandler);
        return paymentHandlers;
    }


}
